<?php

namespace App\Http\Controllers\Api\V1\Resources;

use Illuminate\Http\Resources\Json\JsonResource;

class PosterResource extends JsonResource
{
    public function toArray($request)
    {
    	$resource = $this->resource;
    	
        return [
        	'id' => (int)$resource->id,
	        'poster' => img_path($resource->poster),
            'type' => $resource->type,
            'is_disabled' =>(bool)$resource->is_disabled,
	        'brief' => $resource->brief,
	        'created_at' => (string)$resource->created_at,
        ];
    }
}
